/*
 * Pins.h
 *
 * Created: 4/1/2013 5:50:18 PM
 *  Author: Administrator
 */ 


#ifndef PINS_H_
#define PINS_H_

/*-----------------------------------------------------------------------------------
// I/O Pin Definitions for the project
//
//	Each pin should have a
//	  PIN  - which specifies which bit to modify
//	  PORT - which defines the register to write output values (PIN Name + PORT suffix)
//	  DDR  - which defines which data direction register to modify  (PIN Name + DDR suffix)
//-----------------------------------------------------------------------------------*/

//--------------------------------------------------------------------------------
// Status LED
//--------------------------------------------------------------------------------
// LED output pin
#define	STATUS_LED_DDR		DDRD		// Data direction register
#define	STATUS_LED_PINS		PIND
#define	STATUS_LED_PORT		PORTD	// Data port
#define	STATUS_LED			0			// Pin



//--------------------------------------------------------------------------------
// LDC control signal pin definitions
//--------------------------------------------------------------------------------

// LDC Read/Write pin
#define	LDC_RW_DDR	  DDRD		// Data direction register
#define	LDC_RW_PORT	  PORTD	// Data port
#define	LDC_RW   6				// Pin


// LCD Enable Pin
#define	LDC_E_DDR	  DDRD		// Data direction register
#define	LDC_E_PORT	  PORTD	// Data port
#define	LDC_E   5				// Pin


// LCD Register Select Pin
#define	LDC_RS_DDR	  DDRD		// Data direction register
#define	LDC_RS_PORT	  PORTD	// Data port
#define	LDC_RS   7				// Pin


// LCD Data port
#define	LDC_DATA_DDR	 DDRC	// Data direction register
#define	LDC_DATA_PORT	 PORTC	// Data port
#define	LDC_DATA_PINS	 PINC	// Pin port


// Button 1
#define	BUTTON1_DDR		 DDRD	// Data direction register
#define	BUTTON1_PORT	 PORTD // Data port
#define	BUTTON1_PINS	 PIND  // Pin Port
#define	BUTTON1			 1		// Pin


// Button 2
#define	BUTTON2_DDR		 DDRD	// Data direction register
#define	BUTTON2_PORT	 PORTD // Data port
#define	BUTTON2_PINS	 PIND  // Pin Port
#define	BUTTON2			 2		// Pin


// Button 3
#define	BUTTON3_DDR		 DDRD	// Data direction register
#define	BUTTON3_PORT	 PORTD // Data port
#define	BUTTON3_PINS	 PIND  // Pin Port
#define	BUTTON3			 3		// Pin

// Button 4
#define	BUTTON4_DDR		 DDRD	// Data direction register
#define	BUTTON4_PORT	 PORTD // Data port
#define	BUTTON4_PINS	 PIND  // Pin Port
#define	BUTTON4			 4		// Pin

//RPM Counter Input Pin
#define	RPMCOUNTER_DDR	 DDRA  // Data direction register
#define	RPMCOUNTER_PORT  PORTA // Data Port
#define	RPMCOUNTER_PINS  PINA	// Pin Port
#define	RPMCOUNTER		 1		// Pin



#endif /* PINS_H_ */